function getOsInfo() {
    var userAgent = navigator.userAgent.toLowerCase();
    var name = 'Unknown';
    var version = 'Unknown';
    if (userAgent.indexOf('win') > -1) {
        name = 'Windows';
        if (userAgent.indexOf('windows nt 5.0') > -1) {
            version = '2000';
        } else if (userAgent.indexOf('windows nt 5.1') > -1 || userAgent.indexOf('windows nt 5.2') > -1) {
            version = 'XP';
        } else if (userAgent.indexOf('windows nt 6.0') > -1) {
            version = 'Vista';
        } else if (userAgent.indexOf('windows nt 6.1') > -1 || userAgent.indexOf('windows 7') > -1) {
            version = '7';
        } else if (userAgent.indexOf('windows nt 6.2') > -1 || userAgent.indexOf('windows 8') > -1) {
            version = '8';
        } else if (userAgent.indexOf('windows nt 6.3') > -1) {
            version = '8.1';
        } else if (userAgent.indexOf('windows nt 6.2') > -1 || userAgent.indexOf('windows nt 10.0') > -1) {
            version = '10';
        } else {
            version = 'Unknown';
        }
    } else if (userAgent.indexOf('iphone') > -1) {
        name = 'Iphone';
    } else if (userAgent.indexOf('mac') > -1) {
        name = 'Mac';
    } else if (userAgent.indexOf('x11') > -1 || userAgent.indexOf('unix') > -1 || userAgent.indexOf('sunname') > -1 || userAgent.indexOf('bsd') > -1) {
        name = 'Unix';
    } else if (userAgent.indexOf('linux') > -1) {
        if (userAgent.indexOf('android') > -1) {
            name = 'Android';
        } else {
            name = 'Linux';
        }
    } else {
        name = 'Unknown';
    }
    if (version != "Unknown") {
        $("#osInfo").text(name + " " + version);
    } else {
        $("#osInfo").text(name);
    }
}

function bro() {
    var is360 = false;
    var isIE = false;
    var isFirefox = false;
    var isChrome = false;
    var isEdge = false;
    var broName = 'Runing';
    var str = '';
    var strStart = 0;
    var strStop = 0;
    var arr = new Array();
    var temp = '';

    var userAgent = window.navigator.userAgent; //包含以下属性中所有或一部分的字符串：appCodeName,appName,appVersion,language,platform

    /*alert(userAgent);*/

//FireFox
    if (userAgent.indexOf('Firefox') != -1) {
        isFireFox = true;
        /*broName = 'FireFox浏览器';*/
        strStart = userAgent.indexOf('Firefox');
        temp = userAgent.substring(strStart);
        broName = temp.replace('/', '版本号')

    }

//Edge
    if (userAgent.indexOf('Edge') != -1) {
        isEdge = true;
        /*broName = 'Edge浏览器';*/
        strStart = userAgent.indexOf('Edge');
        temp = userAgent.substring(strStart);
        broName = temp.replace('/', '版本号');
    }

//IE浏览器
    if (userAgent.indexOf('NET') != -1 && userAgent.indexOf("rv") != -1) {
        isIE = true;
        /*broName = 'IE浏览器'; */
        strStart = userAgent.indexOf('rv');
        strStop = userAgent.indexOf(')');
        temp = userAgent.substring(strStart, strStop);
        broName = temp.replace('rv', 'IE').replace(':', '版本号');
    }

//360极速模式可以区分360安全浏览器和360极速浏览器
    if (userAgent.indexOf('WOW') != -1 && userAgent.indexOf("NET") < 0 && userAgent.indexOf("Firefox") < 0) {
        if (navigator.javaEnabled()) {
            is360 = true;
            broName = '360安全浏览器-极速模式';
        } else {
            is360 = true;
            broName = '360极速浏览器-极速模式';
        }
    }

//360兼容
    if (userAgent.indexOf('WOW') != -1 && userAgent.indexOf("NET") != -1 && userAgent.indexOf("MSIE") != -1 && userAgent.indexOf("rv") < 0) {
        is360 = true;
        broName = '360兼容模式';
    }

//Chrome浏览器
    if (userAgent.indexOf('WOW') < 0 && userAgent.indexOf("Edge") < 0) {
        isChrome = true;
        /*broName = 'Chrome浏览器';*/
        strStart = userAgent.indexOf('Chrome');
        strStop = userAgent.indexOf(' Safari');
        temp = userAgent.substring(strStart, strStop);
        broName = temp.replace('/', '版本号');

    }
    $("#browserName").text(broName);
}

setInterval(time, 1000);

var vWeek, vWeek_s, strDate;
vWeek = ["星期天", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"];

function time() {
    var date = new Date();
    var year = date.getFullYear();
    var month = date.getMonth() + 1;
    var day = date.getDate();
    var hours = date.getHours();
    var minutes = date.getMinutes();
    var seconds = date.getSeconds();
    vWeek_s = date.getDay();
    switch (vWeek_s) {

        case 0: {

            strDate = "星期日"

        }
            break;

        case 1: {

            strDate = "星期一"

        }
            break;

        case 2: {

            strDate = "星期二"

        }
            break;

        case 3: {

            strDate = "星期三"

        }
            break;

        case 4: {

            strDate = "星期四"

        }
            break;

        case 5: {

            strDate = "星期五"

        }
            break;

        case 6: {

            strDate = "星期六"

        }
            break;

        case 7: {

            strDate = "星期日"

        }
            break;

    }
    $("#time").text(year + "-" + month + "-" + day + " " + hours + ":" + minutes + ":" + seconds);
}